<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    <div id="app">
        <p v-text="msg"></p>
        <button v-on:click="fn('hello', $event)">按钮</button>
        <input type="text" v-on:change="changeFn">
        <input type="text" v-on:input="inputFn">
        <input type="text" v-on:keyup="upFn">
        <input type="text" v-on:keydown="downFn">
        <input type="text" @keydown="downFn">
        <button @click="fn('hello', $event)">按钮</button>
    </div>
</body>
<script src="./libs/vue.min.js"></script>
<script>
    new Vue({
        el:"#app",
        data(){
            return {
                msg:"hello"
            }
        },
        methods: {
            fn(abc, event){
                // console.log(abc, event);
                // console.log(event)
                // console.log(event.target)
                this.msg = "world";
                this.show();
            },
            show(){
                console.log("hahaha")
            },
            changeFn(event){
                console.log(event.target.value);
            },
            inputFn(event){
                console.log(event.target.value);
            },
            upFn(event){
                console.log(event.keyCode);
            },
            downFn(event){
                console.log(event.target.value);
            },
        },
    })
</script>
</html>